package Day8Zuoye;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class WeatherUser {
    public static void main(String[] args) {
        try {
            Socket s=new Socket("192.168.10.140",8888);
            InputStream in = s.getInputStream();
            OutputStream out = s.getOutputStream();
            BufferedReader br=new BufferedReader(new InputStreamReader(in));
            PrintWriter pw=new PrintWriter(out,true);
            Scanner input=new Scanner(System.in);
            System.out.println("输入你要查找的信息:");
            String info=input.next();
            pw.println(info);
            String reply=br.readLine();
            System.out.println("服务器说："+reply);
            s.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


}
